package Class.Method.VarParameter;

/**
 * Enjoy programming!!!
 * Time: 2021/11/7 -  16:46
 */
public class Test00 {
    public static void main(String[] args){
        HspMethod hm = new HspMethod();
        System.out.println(hm.showScore("milan" , 90.1, 80.0 ));
        System.out.println(hm.showScore("terry" , 90.1, 80.0,10,30.5,70 ));
    }
}
class HspMethod{
    public String  showScore(String name, double...s){
        double total = 0;
        for (int i = 0; i < s.length; i++){
            total += s[i];
        }
        return name + "前" + s.length + "成绩之和为：" + total;
    }
}